feat(rivetkit): sqlite vfs v2#4673
Draft
NathanFlurry wants to merge 8 commits into04-15-chore_rename_sandbox_-_kitchen_sinkfrom
Draft
feat(rivetkit): sqlite vfs v2#4673NathanFlurry wants to merge 8 commits into04-15-chore_rename_sandbox_-_kitchen_sinkfrom
NathanFlurry wants to merge 8 commits into04-15-chore_rename_sandbox_-_kitchen_sinkfrom
Conversation
|
🚅 Deployed to the rivet-pr-4673 environment in rivet-frontend
|
Member
Author
27742e1 to
83bef30
Compare
95ee628 to
9f5f7b3
Compare
This was referenced Apr 16, 2026
Contributor
Preview packages published to npmInstall with: npm install rivetkit@pr-4673All packages published as Engine binary is shipped via Docker images: docker pull rivetdev/engine:slim-39f8e28
docker pull rivetdev/engine:full-39f8e28Individual packagesnpm install rivetkit@pr-4673
npm install @rivetkit/react@pr-4673
npm install @rivetkit/rivetkit-native@pr-4673
npm install @rivetkit/workflow-engine@pr-4673 |
9f5f7b3 to
2aff233
Compare
2aff233 to
61589f3
Compare
xWrite in the v2 VFS was calling resolve_pages for every dirty page, even when the write was a full-page aligned overwrite. For page numbers beyond db_size_pages (newly allocated pages), this meant fetching from the engine to get data that doesn't exist. A 256-row INSERT transaction (~1MB of dirty data) was making 288 round trips to the engine: one get_pages RTT per new page allocation. At 128ms staging RTT that's ~37s of theoretical network time vs the ~130ms needed for just the final commit. Now: - Full-page aligned writes (offset % page_size == 0 && amt % page_size == 0) skip resolve_pages entirely and use a zero-filled page as the base. - Partial writes filter out pages > db_size_pages before calling resolve_pages, synthesizing zero pages locally for new allocations. Direct engine profiling tests verify 0 engine fetches for 1MB, 5MB, and 100-hot-row-updates workloads. Adds new stress-test workloads to the kitchen-sink bench: churnInsertDelete, mixedOltpLarge, growingAggregation, indexCreationOnLargeTable, bulkUpdate1000Rows, truncateAndRegrow, manySmallTables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: